<?php
/**
 * Created by PhpStorm.
 * User: fuguang
 * Date: 2017/6/9
 * Time: 下午3:04
 */

$base = Yii::$app->basePath;
$svgpath = $base."/web/svg/chart.svg";
?>

<img src="<?= $filewebpath;?>" width="700" height="400" />

<style type="text/css">
    .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
        border-top: 1px solid #f4f4f4;
    }
    .table > thead > tr > th {
        border-bottom: 2px solid #f4f4f4;
    }
    .table tr td .progress {
        margin-top: 5px;
    }
    .table-bordered {
        border: 1px solid #f4f4f4;
    }
    .table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td {
        border: 1px solid #f4f4f4;
    }
    .table-bordered > thead > tr > th, .table-bordered > thead > tr > td {
        border-bottom-width: 2px;
    }
    .table.no-border, .table.no-border td, .table.no-border th {
        border: 0 none;
    }
    table.text-center, table.text-center td, table.text-center th {
        text-align: center;
    }
    .table.align th {
        text-align: left;
    }
    .table.align td {
        text-align: right;
    }
</style>
<div class="table-responsive kv-grid-container">
    <table class="kv-grid-table table table-bordered table-striped">
        <colgroup>
            <col>
            <col>
            <col>
            <col>
            <col>
            <col>
            <col>
            <col>
            <col>
            <col class="skip-export">
        </colgroup>
        <thead>
        <tr>
            <th data-col-seq="0" style="width: 3.76%;">ID</th>
            <th data-col-seq="1" style="width: 12.29%;">Pornracynum</th>
            <th data-col-seq="2" style="width: 9.17%;">Totalnum</th>
            <th data-col-seq="3" style="width: 11.74%;">Percent Num</th>
            <th data-col-seq="4" style="width: 11.74%;">Pornracyimp</th>
            <th data-col-seq="5" style="width: 8.81%;">Totalimp</th>
            <th data-col-seq="6" style="width: 16.61%;">Percent Impression</th>
            <th data-col-seq="7" style="width: 8.26%;">Country</th>
            <th data-col-seq="8" style="width: 8.81%;">Ymd</th>
        </tr>
        </thead>
        <tbody>
        <?php foreach ($numimp as $item){?>
        <tr>
            <td data-col-seq="0"><?= $item['id'];?></td>
            <td data-col-seq="1"><?= $item['pornracynum'];?></td>
            <td data-col-seq="2"><?= $item['totalnum'];?></td>
            <td data-col-seq="3"><?= sprintf("%.2f",($item['pornracynum']/$item['totalnum']) * 100);?> %</td>
            <td data-col-seq="4"><?= $item['pornracyimp'];?></td>
            <td data-col-seq="5"><?= $item['totalimp'];?></td>
            <td data-col-seq="6"><?= sprintf("%.2f",($item['pornracyimp']/$item['totalimp']) * 100);?> %</td>
            <td data-col-seq="7"><?= $item['country'];?></td>
            <td data-col-seq="8"><?= $item['ymd'];?></td>
        </tr>
        <?php }?>
        </tbody>
    </table>
</div>



